package de.kardass.jsmatep.in.reader;

import de.kardass.jsmatep.schema.jSmaTePImportConfig.FieldType;
import de.kardass.jsmatep.schema.jSmaTePImportConfig.RecordImportConfigType;

public class FixedLengthRecordReader extends AbstractRecordReader {

	public FixedLengthRecordReader(RecordImportConfigType importConfig) {
		super(importConfig);
	}

	public String readField(FieldType fieldConfig, String theRecord) {
		return theRecord.substring(fieldConfig.getPosition(), fieldConfig.getPosition() + fieldConfig.getLength());
	}

}
